package com.dragon.design.pattern.structural.adapter;

/**
 * 电源适配器
 *
 * @author dragon
 * @version V1.0.0-RELEASE
 * @date 2019/5/18 8:19
 */
public class PowerAdapter implements DC5 {
    private AC220 ac220;

    public PowerAdapter(AC220 ac220) {
        this.ac220 = ac220;
    }

    @Override
    public int outputDC5V() {
        int output = ac220.outputAC220V();
        // 变压器 降压

        return output / 44;
    }
}
